package iv1201.controller;

import iv1201.model.EntityDAO;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Mustafa
 */

@Stateless
public class Controller
{
    
    @PersistenceContext(unitName = "iv1201PU")
    
    @EJB
    private EntityDAO entityDAO;
    
    /*
     * Calls the loginRecruiter function in the DAO.
     */
    public String loginRecruiter(String username, String password) 
    {    
        return entityDAO.loginRecruiter(username, password);
    }
       
    
    /*
     * Calls the applicantInfo function in the DAO.
     */
    public String applicantInfo(String name, String surname, String email) 
    {    
        return entityDAO.applicantInfo(name, surname, email);
    }

    /*
     * Calls the welcomeLogin function in the DAO.
     */
    public String welcomeLogin(String username) 
    {    
        return entityDAO.welcomeLogin(username);
    }
}
